import request from "@/utils/request";

// 查询接口文档列表
export function listDoc(query) {
  return request({
    url: "/user/apiDoc/list",
    method: "post",
    data: query,
  });
}

// 查询接口文档详细
export function getDoc(id) {
  return request({
    url: "/user/apiDoc/" + id,
    method: "get",
  });
}

// 新增接口文档
export function addDoc(data) {
  return request({
    url: "/user/apiDoc",
    method: "post",
    data: data,
  });
}

// 修改接口文档
export function updateDoc(data) {
  return request({
    url: "/user/apiDoc",
    method: "put",
    data: data,
  });
}

// 删除接口文档
export function delDoc(id) {
  return request({
    url: "/user/apiDoc/" + id,
    method: "delete",
  });
}
